home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compendium Deluxe 2
/
LSD and 17bit Compendium Deluxe - Volume II.iso
/
a
/
prog
/
asmsrc
/
mischards.lha
/
SourceCode
/
Gridder-Seg.s
< prev
next >
Wrap
Text File
|
1980-02-20
|
10KB
|
538 lines
Opt c-
Section "Resourced Gridder Segment",Code_C
*****************************************************************************
* FUCK ME!! AS IF I HAVE TO RESOURCE MY OWN FUCKING CODE!!! Lousy fucking *
* floppy disks!!! *
*****************************************************************************
Start BRA.S L000001
BRA.S L000002
BRA L000004
L000001:
MOVEM.L D0-D7/A0-A6,-(A7)
LEA.L GridScreen(PC),A5
MOVE.L A0,(A5)
LEA.L 14848(A0),A0
MOVE.L A0,4(A5)
LEA.L 6208(A0),A0
MOVE.L A0,8(A5)
LEA.L OldCopper(PC),A5
MOVE.L A1,(A5)
BSR L000006
BSR L000015
BSR L00000B
MOVEM.L (A7)+,D0-D7/A0-A6
RTS
L000002:
MOVEM.L D0-D7/A0-A6,-(A7)
Lea XYDataPt(pc),a6
Move.l a1,(a6)
MOVE.W #31,D7
LEA.L CopperCols(PC),A1
L000003:
MOVE.L (A0)+,(A1)+
DBF D7,L000003
LEA.L CopperList(PC),A0
LEA.L $00DFF000,A6
MOVE.L A0,128(A6)
MOVE.L A0,D0
BSR L000021
BSR L000008
LEA.L GridPlane(PC),A0
Move.l XYDataPt(pc),a1
Lea XGridSize(pc),a6
MOVE.L #$00000006,(A0)
BSR L000005
MOVE.L #$0000000A,(A0)
BSR L000005
MOVE.L #$0000000E,(A0)
BSR L000005
MOVE.L #$00000012,(A0)
BSR L000005
MOVE.L #$00000016,(A0)
BSR L000005
MOVEM.L (A7)+,D0-D7/A0-A6
RTS
L000004:
MOVEM.L D0-D7/A0-A6,-(A7)
BSR L000020
MOVEM.L (A7)+,D0-D7/A0-A6
RTS
L000005:
Move.l (a1)+,(a6)
MOVEM.L A0-A1,-(A7)
BSR L00000F
MOVEM.L (A7)+,A0-A1
RTS
L000006:
LEA.L CopperBPLS(PC),A0
MOVE.L GridScreen(PC),D0
MOVEQ.L #4,D7
L000007:
MOVE.L D0,D1
MOVE.W D1,6(A0)
SWAP.W D1
MOVE.W D1,2(A0)
ADDQ.L #8,A0
DBF D7,L000007
RTS
L000008:
LEA.L Altern8(PC),A0
BCHG.B #0,(A0)
BNE L000009
MOVE.L GridCopper1Pt(PC),D0
MOVE.L GridCopper2Pt(PC),D1
BRA L00000A
L000009:
MOVE.L GridCopper2Pt(PC),D0
MOVE.L GridCopper1Pt(PC),D1
L00000A:
LEA.L CopperStrobe(PC),A0
MOVE.W D0,6(A0)
SWAP.W D0
MOVE.W D0,2(A0)
LEA.L CurrentGrid(PC),A0
MOVE.L D1,(A0)
RTS
L00000B:
MOVEA.L GridCopper1Pt(PC),A2
MOVEA.L A2,A0
MOVE.L #$2901FFFE,(A0)
MOVE.L #$00E20000,4(A0)
MOVE.L #$00E60000,8(A0)
MOVE.L #$00EA0000,12(A0)
MOVE.L #$00EE0000,16(A0)
MOVE.L #$00F20000,20(A0)
LEA.L $00DFF000,A6
MOVE.W #257,D7
L00000C:
BSR L000014
MOVE.L #$FFFFFFFF,68(A6)
MOVE.L #$09F00000,64(A6)
MOVE.L #$00000000,100(A6)
MOVE.L GridCopper1Pt(PC),80(A6)
MOVE.L A0,84(A6)
MOVE.W #386,88(A6)
LEA.L 24(A0),A0
DBF D7,L00000C
MOVE.L #$01000000,(A0)+
LEA.L CopperList(PC),A1
MOVE.L A1,D0
MOVE.W D0,D1
SWAP.W D0
MOVE.W #128,(A0)+
LEA.L CopJumper(PC),A5
MOVE.L A0,(A5)
MOVE.W D0,(A0)+
MOVE.W #130,(A0)+
MOVE.W D1,(A0)+
MOVE.L #$FFFFFFFE,(A0)+
MOVEA.L A2,A0
MOVE.W #42,D0
MOVE.W #257,D1
L00000D:
ADDQ.W #1,D0
MOVE.B D0,(A0)
CMPI.W #256,D0
BNE L00000E
MOVE.W #65505,(A0)
MOVE.W #0,D0
L00000E:
LEA.L 24(A0),A0
DBF D1,L00000D
BSR L000014
MOVE.L #$FFFFFFFF,68(A6)
MOVE.L #$09F00000,64(A6)
MOVE.L #$00000000,100(A6)
MOVE.L GridCopper1Pt(PC),80(A6)
MOVE.L GridCopper2Pt(PC),84(A6)
MOVE.W #12432,88(A6)
RTS
L00000F:
MOVEA.L CurrentGrid(PC),A0
ADDA.L GridPlane(PC),A0
MOVEA.L A0,A1
LEA.L 3096(A0),A0
MOVEA.L A0,A1
LEA.L -24(A1),A1
MOVE.W YGridSize(PC),D0
MOVE.W XGridSize(PC),D1
MOVEQ.L #112,D2
MULS.W D1,D2
MOVE.W D2,D3
ADDI.W #56,D3
MOVE.W #0,D7
MOVE.L GridScreen(PC),D5
ADDQ.W #6,D2
ADDQ.W #6,D3
ADD.W D5,D2
ADD.W D5,D3
L000010:
MOVE.W D0,D1
L000011:
MOVE.W D2,(A0)
MOVE.W D3,(A1)
LEA.L 24(A0),A0
LEA.L -24(A1),A1
ADDQ.W #1,D7
CMPI.W #129,D7
BGE L000013
DBF D1,L000011
MOVE.W D0,D1
L000012:
MOVE.W D3,(A0)
MOVE.W D2,(A1)
LEA.L 24(A0),A0
LEA.L -24(A1),A1
ADDQ.W #1,D7
CMPI.W #129,D7
BGE L000013
DBF D1,L000012
BRA.S L000010
L000013:
RTS
L000014:
BTST.B #14,2(A6)
BNE.S L000014
RTS
L000015:
MOVEA.L GridScreen(PC),A0
MOVEA.L A0,A1
LEA.L 14848(A1),A1
L000016:
MOVE.L #$00000000,(A0)+
CMPA.L A0,A1
BNE.S L000016
MOVEA.L GridScreen(PC),A0
MOVE.W #131,D7
MOVEQ.L #-1,D1
MOVE.L D1,D2
MOVE.L D1,D3
MOVE.L D1,D4
MOVE.L D1,D5
MOVE.L D1,D6
MOVE.L D1,D0
L000017:
MOVEM.L D0-D6,(A0)
LEA.L 112(A0),A0
DBF D7,L000017
MOVEA.L GridScreen(PC),A0
MOVE.W #131,D0
MOVEQ.L #-1,D1
L000018:
MOVE.W D1,D5
MOVE.W #224,D2
MOVE.W D2,D7
MOVEA.L A0,A1
L000019:
MOVE.W D2,D3
MOVE.W D3,D4
LSR.W #3,D3
NOT.B D4
BSET.B D4,0(A0,D3.W)
MOVE.W D7,D3
MOVE.W D7,D4
LSR.W #3,D3
NOT.B D4
BCLR.B D4,0(A0,D3.W)
ADDQ.W #1,D2
SUBQ.W #1,D7
CMP.W #448,D2
BGT L00001A
DBF D5,L000019
ADD.W D1,D2
SUB.W D1,D7
MOVE.W D1,D5
CMP.W #448,D2
BGT L00001A
BRA.S L000019
L00001A:
MOVEA.L A1,A2
MOVEA.L A1,A3
LEA.L 56(A2),A2
MOVE.W #13,D7
L00001B:
MOVE.L (A3)+,D6
EORI.L #$FFFFFFFF,D6
MOVE.L D6,(A2)+
DBF D7,L00001B
ADDQ.W #1,D1
LEA.L 112(A0),A0
DBF D0,L000018
RTS
L000020:
MOVE.L OldCopper(PC),D0
L000021:
MOVEA.L CopJumper(PC),A0
MOVEA.L CopJumper(PC),A1
LEA.L 6208(A1),A1
MOVE.W D0,4(A0)
MOVE.W D0,4(A1)
SWAP.W D0
MOVE.W D0,(A0)
MOVE.W D0,(A1)
RTS
OldCopper Dc.l 0
Altern8 Dc.w 0
CopJumper Dc.l 0
GridScreen Dc.l 0
GridCopper1Pt Dc.l 0
GridCopper2Pt Dc.l 0
CurrentGrid Dc.l 0
GridPlane Dc.l 0
GridSine Dc.l 0
XGridSize Dc.w 0
YGridSize Dc.w 0
XYDataPt Dc.w 0
SinePoint1 Dc.l 46
SinePoint2 Dc.l 20
SineSpeed1 Dc.l 18
SineSpeed2 Dc.l 26
Dc.l 22
Dc.l 44
Dc.l 16
Dc.l 14
Dc.l 14
Dc.l 32
Dc.l 12
Dc.l 18
Dc.l 46
Dc.l 48
Dc.l 26
Dc.l 10
Dc.l 20
Dc.l 46
Dc.l 22
Dc.l 26
SinePoint1a Dc.l 36
SinePoint2a Dc.l 64
SineSpeed1a Dc.l 24
SineSpeed2a Dc.l 14
Dc.l 10
Dc.l 50
Dc.l 24
Dc.l 22
Dc.l 8
Dc.l 72
Dc.l 24
Dc.l 8
Dc.l 44
Dc.l 6
Dc.l 12
Dc.l 26
Dc.l 18
Dc.l 2
Dc.l 14
Dc.l 30
Cmv Macro
Dc.w \2,\1
EndM
Cwt Macro
Dc.w (\1*$100)+$01,$fffe
EndM
Pal Macro
Dc.w $ffe1,$fffe
EndM
EndCop Macro
Dc.w $ffff,$fffe
EndM
CopperList Cwt $15
Cmv $0200,BplCon0
Cmv $00bb,BplCon1
Cmv $000a,BplCon2
Cmv $0034,DdfStrt
Cmv $00c8,DdfStop
Cmv $1671,DiwStrt
Cmv $36e1,DiwStop
Cmv $48,BplMod1
Cmv $48,BplMod2
Cwt $20
CopperCols Cmv $0000,Color00
Cmv $0fff,Color01
Cmv $0eee,Color02
Cmv $0ddd,Color03
Cmv $0ccc,Color04
Cmv $0bbb,Color05
Cmv $0aaa,Color06
Cmv $0999,Color07
Cmv $0888,Color08
Cmv $0777,Color09
Cmv $0666,Color10
Cmv $0555,Color11
Cmv $0444,Color12
Cmv $0333,Color13
Cmv $0222,Color14
Cmv $0111,Color15
Cmv $0123,Color16
Cmv $000f,Color17
Cmv $0f00,Color18
Cmv $0f0f,Color19
Cmv $00f0,Color20
Cmv $00ff,Color21
Cmv $0ff0,Color22
Cmv $0fff,Color23
Cmv $0555,Color24
Cmv $055c,Color25
Cmv $0c55,Color26
Cmv $0c5c,Color27
Cmv $05c5,Color28
Cmv $05cc,Color29
Cmv $0cc5,Color30
Cmv $0ccc,Color31
CopperBPLS Cmv $c,BplPt0h
Cmv $0,BplPt0l
Cmv $c,BplPt1h
Cmv $0,BplPt1l
Cmv $c,BplPt2h
Cmv $0,BplPt2l
Cmv $c,BplPt3h
Cmv $0,BplPt3l
Cmv $c,BplPt4h
Cmv $0,BplPt4l
Cmv $0,BplPt5h
Cmv $1000,BplPt5l
Cwt $2b
Cmv $5200,BplCon0
CopperStrobe Cmv $c,Cop1Lch
Cmv $5800,Cop1Lcl
Cmv $0,CopJmp1
SineData Incbin SysData/Sine1024Bs.Dat
Incbin SysData/Sine1024Bs.Dat
****Custom Chip Registers****
Hardware = $Dff000
;Control Registers
Dmaconr = $002
Vposr = $004
Vhposr = $006
Joy0dat = $00A
Joy1dat = $00C
Clxdat = $00E
Intenar = $01C
Intereqr = $01E
Copcon = $02E
;Blitter Registers
Bltcon0 = $040
Bltcon1 = $042
Bltafwm = $044
Bltalwm = $046
Bltcpth = $048
Bltcptl = $04A
Bltbpth = $04C
Bltbptl = $04E
Bltapth = $050
Bltaptl = $052
Bltdpth = $054
Bltdptl = $056
Bltsize = $058
Bltcmod = $060
Bltbmod = $062
Bltamod = $064
Bltdmod = $066
Bltcdat = $070
Bltbdat = $072
Bltadat = $074
;Copper Registers
Cop1lc = $080
Cop1lch = $080
Cop1lcl = $082
Cop2lc = $084
Cop2lch = $084
Cop2lcl = $086
Copjmp1 = $088
Copjmp2 = $08A
Diwstrt = $08E
Diwstop = $090
Ddfstrt = $092
Ddfstop = $094
Dmacon = $096
Clxcon = $098
Intena = $09A
Intreq = $09C
;BitPlane Registers
BplCon0 = $100
BplCon1 = $102
BplCon2 = $104
BplMod1 = $108
BplMod2 = $10a
BplPt0h = $0e0
BplPt0l = $0e2
BplPt1h = $0e4
BplPt1l = $0e6
BplPt2h = $0e8
BplPt2l = $0ea
BplPt3h = $0ec
BplPt3l = $0ee
BplPt4h = $0f0
BplPt4l = $0f2
BplPt5h = $0f4
BplPt5l = $0f6
;Colour Registers
Color00 = $180
Color01 = $182
Color02 = $184
Color03 = $186
Color04 = $188
Color05 = $18a
Color06 = $18c
Color07 = $18e
Color08 = $190
Color09 = $192
Color10 = $194
Color11 = $196
Color12 = $198
Color13 = $19a
Color14 = $19c
Color15 = $19e
Color16 = $1a0
Color17 = $1a2
Color18 = $1a4
Color19 = $1a6
Color20 = $1a8
Color21 = $1aa
Color22 = $1ac
Color23 = $1ae
Color24 = $1b0
Color25 = $1b2
Color26 = $1b4
Color27 = $1b6
Color28 = $1b8
Color29 = $1ba
Color30 = $1bc
Color31 = $1be
EcsNop = $1fe